1. Field of the Invention
The present invention relates to a storage control apparatus and a method in which data and parity are dispersively stored in a plurality of storage devices such as RAID (Redundant Array of Inexpensive Disks) and a rebuild process for the data and the parity is executed in the case of the failure of the storage device.
2. Description of the Related Art
The above RAID is a technique in which a plurality of hard disks are combined and are managed as one hard disk with a redundancy. And the RAID can be classified into seven levels from RAID 0 to RAID 6 in accordance with the method of assignment of data to disks and the method of realizing the redundancy of data. Among the seven levels of RAID, in RAID 3 to RAID 6, the redundancy is realized by storing the parity generated based on the data is stored separately from the data. In the case of the failure of the disk, a rebuild process is executed in order to restore the data in the failing disk by using the parity (See Japanese Patent Application Publication No. 03-240123, for example).
The RAID 6 is the level of RAID which mitigates the failures in two disks. In the RAID 6, two parities P and Q of different types are dispersively stored in different disks respectively, and different methods of restoration are employed in the rebuild processes respectively for the failure in one disk and the failures in two disks.
For example, when data D0 is lost due to a failure in a disk 10 in a RAID device consisting of five disks of disks 10 to 14 as shown in FIG. 1A, the rebuild process for the failure in one disk is executed by using a hot spare 15 which is a spare disk. Upon this, the data D0 is restored based on data D1, D2 and parity P stored in other disks 11 to 13.
To the contrary to above, when data D0 and D1 are lost due to the failures in disks 10 and 11 as shown in FIG. 1B, a rebuild process for the failures in two disks is executed by using hot spares 15 and 16. Upon this, the data D0 and D1 are restored based on data D2 and parities P and Q stored in other disks 12 to 14.
Generally in RAID 6, for each striping, the different kinds of information are stored in the failing disk and the different kinds of information are required for restoration of the information stored in the failing disk, because different disks store the data and the parity for each striping. Accordingly, in the explanation below, the information stored in each disk is referred to as data/parity.
When the situation with the failure in one disk changes into the situation with the failures in two disks, also the rebuild process has to be switched from the rebuild process for the failure in one disk to the rebuild process for the failures in two disks. For example, when a second disk #1 fails while the rebuild process for the failure in one disk is being executed in which the firstly failing disk #0 is replaced by a hot spare (HS) as shown in FIG. 1C, the data/parity can not be restored by the above rebuild process for the failure in one disk. Accordingly, it is usually designed that the rebuild process for the failures in two disks starts by using hot spares HS #0 and HS #1 after stopping the rebuild process for the failure in one disk.
The above described rebuild process for the failures in two disks has the problems below.
In the rebuild process for the failures in two disks shown in FIG. 1C, the restored data/parity already stored in the rebuilt are of the hot spare HS #0 is discarded, and the rebuild process is again executed from the beginning. Accordingly, the restored data/parity is not utilized effectively.
Also, the rebuild process for the failures in two disks which requires greater cost than the rebuild process for the failure in one disk is executed on the entire area of the hot spares HS #0 and HS #1 so that longer time is needed for the restoration of the redundancy.